<?

require_once  $_SERVER['DOCUMENT_ROOT']."/../_lib/base/common.php";
require_once SITE_ROOT_PATH."/_lib/classes/class.hotel_instances_you.php";
require_once SITE_ROOT_PATH."/_lib/classes/class.hotel_instances_mcs.php";
require_once SITE_ROOT_PATH."/_lib/classes/class.hotels.php";
require_once SITE_ROOT_PATH."/_lib/classes/class.template.php";
require_once SITE_ROOT_PATH."/_lib/classes/class.user_auth.php";

	// See if user is logged in 
	$user_auth = new user_auth();
	$user_auth->user_auth_cp();
    

	$template = new template();

	$template->head_control();
?>


<h2>Flagged Hotels</h2>






<h3>Flagged Instances</h3>

<table class="aqua">
    <tr>
        <th width="220">Supplier</th>
        <th width="220">No. of flagged instances</th>
        <th width="220">Most recent instance</th>
        <th>Actions</th>
    </tr>
    
    
    
    <tr>
        <td>Micros</td>
        <td><?
 
		$hotel_instances_mcs = new hotel_instances_mcs();
		$flagged_values = $hotel_instances_mcs->number_flagged_instances();

		echo $flagged_values['0']['count'];
		
        ?></td>
        <td><?= date('d/m/y', $flagged_values['0']['instance_date']) ?></td>
        <td><a href="hotels_flagged_mcs.php">View</a></td>
    </tr>
<?

unset($flagged_values);


?>
    <tr>
        <td>You Travel</td>
        <td><?
 
		$hotel_instances_you = new hotel_instances_you();
		$flagged_values = $hotel_instances_you->number_flagged_instances();

		echo $flagged_values['count'];
		
        ?></td>
        <td><?= date('d/m/y', $flagged_values['instance_date']) ?></td>
        <td><a href="hotels_flagged_you.php">View</a></td>
    </tr>
<?

unset($flagged_values);


?>
</table>

<?
	$template->foot_control();
?>